package com.itheima.HomeWork;

        import java.util.Random;

public class Demo4Arr {
    public static void main(String[] args) {
        Random r = new Random();
        int[] arr = new int[5];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = r.nextInt(10);

        }
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum = sum * 10 +arr[i];
            System.out.println(sum);


        }
        System.out.println("--------");
        System.out.println(sum);
    }
}
